<template>
    <div class="container">
        <Category title="美食" :listData="foods">
            <img slot="center" src="https://s3.ax1x.com/2021/01/16/srJlq0.jpg" alt=""/>
            <a slot="footer" href="http://www.baidu.com">更多美食</a>
        </Category>
        <Category title="游戏" :listData="games">
            <ul slot="center">
                <li v-for="(g,index) in games" :key="index">{{ g }}</li>
            </ul>
            <div class="foot" slot="footer">
                <a href="http://www.baidu.com">单机游戏</a>
                <a href="http://www.baidu.com">网络游戏</a>
            </div>
        </Category>
        <Category title="电影" :listData="films">
            <video slot="center" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
            <template v-slot:footer>
                <div class="foot">
                    <a href="http://www.baidu.com">经典</a>
                    <a href="http://www.baidu.com">热门</a>
                    <a href="http://www.baidu.com">推荐</a>
                </div>
                <h4>欢迎前来观影</h4>
            </template>
        </Category>
    </div>
</template>

<script>
    import Category from './components/Category.vue'
    export default {
        name:'App',
        components:{Category},
        data(){
            return{
                foods:['火锅','烧烤','小龙虾','日料'],
                games:['双人成行','光与夜之恋','恋与制作人','王者荣耀'],
                films:['《情书》','《流浪地球》','《哆啦A梦》','《喜羊羊》']
            }
        }
    }
</script>
<style>
    .container,.foot{
        display: flex;
        justify-content: space-around;
    }
    img{
        width: 100%;
    }
    video{
        width: 100%;
    }
    h4{
        text-align: center;
    }
</style>